package FiveOne;

import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

/**
 * Description：
 * Author: zhangc
 * Date：2017/9/18 19:52
 */
public class Char {


    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String trim = in.next().trim();

        StringBuilder order = getOrder(trim);
        int i, j;
        for (i = 0; i < order.length(); i++) {
            if (isChar(order.charAt(i)))
                break;
        }
        for (j = order.length() - 1; j >= 0; j--) {
            if (isChar(order.charAt(j))) {
                break;
            }
        }
        char aa;
        for (int k = 0; k < i; k++) {
            aa = order.charAt(0);
            order.insert(j + 1, aa);
            order.deleteCharAt(0);
        }
        System.out.println(order);
    }

    public static StringBuilder getOrder(String string) {
        char[] chars = string.toCharArray();
        Character[] c = new Character[ chars.length ];
        for (int i = 0; i < chars.length; i++) {
            c[ i ] = chars[ i ];
        }
        Arrays.sort(c, new Comparator<Character>() {
            @Override
            public int compare(Character o1, Character o2) {
                if (isChar(o1) && isChar(o2)) {
                    if (String.valueOf(o1).toLowerCase().equals(String.valueOf(o2).toLowerCase()))
                        return o2.charValue() - o1.charValue();
                    return String.valueOf(o1).toLowerCase().compareTo(String.valueOf(o2).toLowerCase());
                }
                return 0;
            }
        });
        StringBuilder sb = new StringBuilder();
        for (Character character : c) {
            sb.append(character);
        }
        return sb;
    }

    public static boolean isChar(char c) {
        if ((c >= 65 && c <= 90) || (c >= 97 && c <= 122))
            return true;
        return false;
    }
}
